<?php if(!defined('BASEPATH'))exit('No direct script access allowed'); ?>
<?php if($home == true){ ?>
<div class="borderBlue367">
    <div class="titleABS"><?php echo lang('ADS'); ?> <span class="red"><?php echo lang('VIP'); ?></span></div>
    <div class="oBorderBlue367">
        <div class="iBorderBlue367">
            <div class="list">
                <!--LOOP-->
                <?php foreach($rows as $row){ ?>
                <div>
                    <a class="vtip" href="<?php echo base_url(); ?>ads/section/<?php echo $row->adsSection; ?>/category/<?php echo $row->adsCategory; ?>/detail/<?php echo $row->adsID; ?>/<?php echo url($row->adsTitle); ?>" title="<?php echo tip(sub(strip_tags($row->adsDetail), 50)); ?>"><?php echo sub($row->adsTitle, 50); ?></a>
                    <span class="green"><i>(<?php echo $row->adsView; ?>)</i></span>
                </div>
                <?php } ?>
                <!--LOOP-->
            </div>
        </div>
    </div>
    <div class="viewAll" onclick="redirect('<?php echo base_url(); ?>ads')" title="<?php echo lang('VIEW_ALL'); ?>"></div>
</div>
<?php }else{ ?>
<div class="titleBG">
    <div class="oTitleBG">
        <div class="iTitleBG">
            <div class="txt"><?php echo lang('ADS'); ?> <span class="red"><?php echo lang('VIP'); ?></span></div>
        </div>
    </div>
</div>
<div class="borderBlue739 mTop5">
    <div class="oBorderBlue739">
        <div class="iBorderBlue739 <?php if($rows%2 == 0){echo 'pBottom4';} ?>">
            <div class="row">
                <!--LOOP-->
                <?php $first = true; ?>
                <?php $index = 1; ?>
                <?php foreach($rows as $row){ ?>
                <div class="row32 <?php if($index%2 == 0){echo 'bgColor';} ?>" <?php if($first == true){echo 'style="border:0px;"';} ?>>
                    <div class="iTitle vip" style="width:470px;">
                        <a class="vtip" href="<?php echo base_url(); ?>ads/section/<?php echo $row->adsSection; ?>/category/<?php echo $row->adsCategory; ?>/detail/<?php echo $row->adsID; ?>/<?php echo url($row->adsTitle); ?>" title="<?php echo tip(sub(strip_tags($row->adsDetail), 50)); ?>"><?php echo sub($row->adsTitle, 80); ?></a>
                        <span class="green"><i>(<?php echo $row->adsView; ?>)</i></span>
                    </div>
                    <div class="wid120"><?php echo date_convert($row->adsPostDate); ?></div>
                    <div class="wid110"><?php echo $row->preName; ?></div>
                </div>
                <?php $first = false; ?>
                <?php $index++; ?>
                <?php } ?>
                <!--LOOP-->
            </div>
        </div>
    </div>
</div>
<?php } ?>